package dao;

import java.sql.SQLException;
import java.util.List;

import model.Announces;

public interface AnnounceDao {
	//根据主体ID查询主题信息
	public Announces queryAnntByAnnID(int i) throws SQLException;
	//根据用户ID查询主体列表信息
	public List<Announces> queryAnnListByUserID(String userId) throws SQLException;
	//根据分类ID查询主体列表信息
	public List<Announces> queryAnnListByClassID(int i) throws SQLException;
	//发表新帖子
	public boolean insertAnn(Announces ann) throws SQLException;
	//发表新帖子之后更新用户发表帖子数目
	public boolean updateUserAnnCount(Announces ann) throws SQLException;
	//根据用户ID查询回复主体列表信息
	public List queryRestoreAnnListByUserID(String userId) throws SQLException;
	//根据用户查询主题信息
	public Announces queryAnntByUserId(String i) throws SQLException ;
	//得到所有主体对象
	List<Announces> getAllAnnounces() throws SQLException;
}
